<!doctype html>
<html lang="zh-cmn-Hans">
<head>
	<meta charset="UTF-8" />
	<title>再生资源</title>
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" href="/backend_/css/font.css" />
	<link rel="stylesheet" href="/backend_/css/xadmin.css" />
	<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
	<script src="/backend_/plugin/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="/backend_/javascript/xadmin.js"></script>
	<script type="text/javascript" src="/backend_/javascript/tool.js"></script>
</head>
<body>
	<!-- 顶部开始 -->
	<div class="container">
		<div class="logo"><a>ICT - 再生资源项目</a></div>
		<div class="left_open">
			<i title="展开左侧栏" class="iconfont">&#xe699;</i>
		</div>
		<ul class="layui-nav right">
			<li class="layui-nav-item">
				<a>管理员 - {$manager_info.username}</a>
				<dl class="layui-nav-child">
					<dd><a href="javascript:editPassword();">修改密码</a></dd>
					<dd><a href="javascript:logout();">退出</a></dd>
				</dl>
			</li>
		</ul>
	</div>
	<!-- 顶部结束 -->
	
	<!-- 中部开始 -->
	<!-- 左侧菜单开始 -->
	<div class="left-nav">
		<div id="side-nav">
			<ul id="nav">
				{foreach name="menu_node" item="menu"}
				<li>
					<a>
						<i class="iconfont">{$menu.icon}</i>
						<cite>{$menu.name}</cite>
						<i class="iconfont nav_right">&#xe697;</i>
					</a>
					<ul class="sub-menu">
						{foreach name="menu.child" item="child"}
						<li>
							<a _href="{:url($child['url'])}">
								<i class="iconfont">&#xe6a7;</i>
								<cite>{$child.name}</cite>
							</a>
						</li >
						{/foreach}
					</ul>
				</li>
				{/foreach}
			</ul>
		</div>
	</div>
	<!-- 左侧菜单结束 -->
	
	<!-- 右侧主体开始 -->
	<div class="page-content">
		<div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
			<ul class="layui-tab-title">
				<li class="home">我的桌面</li>
			</ul>
			<div class="layui-tab-content">
				<div class="layui-tab-item layui-show">
					<iframe src='{:url("Home/index")}' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
				</div>
			</div>
		</div>
	</div>
	<div class="page-content-bg"></div>
	<!-- 右侧主体结束 -->
	<!-- 中部结束 -->
	
	<!-- 底部开始 -->
	<div class="footer">
		<div class="copyright">Copyright 2019 XiaoJiang All Rights </div>  
	</div>
	<!-- 底部结束 -->
	
	<script type="text/javascript">
		
		/**
		 * 修改密码
		 */
		function editPassword() {
			let url = '{:url("Home/edit_password")}';
			action_post_json(url, {action: 'get_page'}, function(response){
				switch(response.errno){
					case 0 :
						layer.open({
							type: 1,
							title: '修改密码',
							area: ['369px', '300px'],
							btn: ['确定', '取消'],
							content: response.data.page,
							yes: function(window_open){
								edit_password_clickYes(window_open);
							}
						});
						break;
						
					default:
						layer.msg(response.message);
						break;
				};
			});
		};
		
		
		/**
		 * 登出
		 */
		function logout() {
			layer.confirm('确定要退出登录吗？', {}, function(){
				let url = '{:url("Home/logout")}';
				action_post_json(url, {}, function(response){
					layer.msg(response.message);
					switch(response.errno){
						case 0 :
							setTimeout(function(){
								window.location.reload();
							}, 1500);
							break;
					};
				});
			});
		};
	
	</script>
</body>
</html>